package com.falm.picturebackend.common;

import lombok.Data;

/**
 * 全局响应封装类
 * @param <T>
 */
@Data
public class BaseResponse<T> {
    private String code;
    private String message;
    private T data;

    public BaseResponse(String code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public BaseResponse(String code, String message) {
        this(code, message, null);
    }

    public BaseResponse(String code) {
        this(code, "", null);
    }

    public BaseResponse(T data) {
        this("00000", "success", data);
    }

    public BaseResponse() {
        this("00000", "success", null);
    }

}
